const db = wx.cloud.database()
Page({
  data: {
    dataList: []
  },
  getFlowerList: function () {
    db.collection("goods").get().then(r => {
      this.setData({
        dataList: r.data
      })
    }).catch(r => {
      console.log(r)
    });
    // this.setData({
    //   dataList:    [  {
    //       goods_id:1,
    //       goods_title:'商品标题1',
    //       goods_img:'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1588370754097&di=8ac02661da7e3d2b98af76d361da29b9&imgtype=0&src=http%3A%2F%2Fp2.so.qhimgs1.com%2Ft01dfcbc38578dac4c2.jpg',
    //       goods_xiaoliang:'0',
    //       goods_price:'60'
    //     }]
    // })
  },

  onShareAppMessage: function () {
    return {
      title: '弹出分享时显示的分享标题',
      desc: '分享页面的内容',
      path: '/pages/user/index?id=1'
    }
  },
  onLoad: function (options) {
    this.getFlowerList();
  },
})